package cst.a113cx.recyclerview02;

import java.sql.Time;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by pc on 2017/5/12.
 */

public class Abean {

        private int articleId;//文章id
        private String title;//文章标题
        private int imgid;//文章图片id，本例使用静态图片
        private String time;//文章时间
        private String description;//文章描述

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getImgid() {
            return imgid;
        }

        public void setImgid(int imgid) {
            this.imgid = imgid;
        }

        public String getTime() {
            return time;
        }

        public void setTime(String time) {
            this.time = time;
        }


        public int getArticleId() {
            return articleId;
        }

        public void setArticleId(int articleId) {
            this.articleId = articleId;
        }

        void buildone(int id,String title,int imageid,String description){
            this.articleId=id;
            this.title=title;
            this.imgid=imageid;
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
            //System.out.println(df.format(new Date()));// new Date()为获取当前系统时间
            time=df.format(new Date());
            this.description=description;
        }
    }

